using System.Text.Json.Serialization;
using JlPay.Sdk.Models;

namespace JlPay.Sdk.Models.Cashier
{
    /// <summary>
    /// 预下单请求
    /// </summary>
    public class PreOrderRequest : OrgBaseRequest
    {
        /// <summary>
        /// API前缀
        /// </summary>
        public const string API_PREFIX = "/open/cashier/trans/trade";
        
        /// <summary>
        /// API URI
        /// </summary>
        public const string API_URI = "/pre-order";

        /// <summary>
        /// 终端号
        /// </summary>
        [JsonPropertyName("term_no")]
        public string? TermNo { get; set; }

        /// <summary>
        /// 外部交易号
        /// </summary>
        [JsonPropertyName("out_trade_no")]
        public string? OutTradeNo { get; set; }

        /// <summary>
        /// 支付有效期
        /// </summary>
        [JsonPropertyName("payment_valid_time")]
        public string? PaymentValidTime { get; set; }

        /// <summary>
        /// 商品描述
        /// </summary>
        [JsonPropertyName("description")]
        public string? Description { get; set; }

        /// <summary>
        /// 附加数据
        /// </summary>
        [JsonPropertyName("attach")]
        public string? Attach { get; set; }

        /// <summary>
        /// 总金额
        /// </summary>
        [JsonPropertyName("total_amount")]
        public string? TotalAmount { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [JsonPropertyName("remark")]
        public string? Remark { get; set; }

        /// <summary>
        /// 通知URL
        /// </summary>
        [JsonPropertyName("notify_url")]
        public string? NotifyUrl { get; set; }

        /// <summary>
        /// 环境版本
        /// </summary>
        [JsonPropertyName("env_version")]
        public string? EnvVersion { get; set; }

        /// <summary>
        /// 商户应用ID
        /// </summary>
        [JsonPropertyName("merch_appid")]
        public string? MerchAppid { get; set; }

        /// <summary>
        /// 返回URL
        /// </summary>
        [JsonPropertyName("return_url")]
        public string? ReturnUrl { get; set; }
    }
} 